import QtQuick 2.15
import QtQuick.Controls 2.15

SubView0{
    id: root
    width: 252
    height: 325
    signal stopGraph
    onStopGraph: {
        if(btnStartGraph.text===qsTr("图形停止"))
        {
            btnStartGraph.text=qsTr("图形开始")
            graphPanel.signalStop();
        }
    }
    //40A0A0
    Button
    {
        id:btnStartGraph
        x: 55
        y: 20
        width: 158
        height: 50
        background: Rectangle{
            border.width: 0
            color: "#40A0A0"
                }

        text: qsTr("图形开始")
        font.pixelSize: 25
        palette.buttonText: "white"
        onClicked: {
            if(btnStartGraph.text===qsTr("图形开始"))
            {
                btnStartGraph.text=qsTr("图形停止")
                graphPanel.signalClear()
                graphPanel.chartStartTime=new Date()
                graphPanel.signalStart();
            }
            else
            {
                btnStartGraph.text=qsTr("图形开始")
                graphPanel.signalStop();
            }
        }
    }
}
